/*
 * 项目名称:    wms-server-jeecg
 * 创建人员:    FanZhiwen
 * 创建时间:    2023-11-22
 */
package org.jeecg.modules.business.third.service.impl;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.business.delivery.service.IWmsDeliveryTaskService;
import org.jeecg.modules.business.third.service.INestStatusService;
import org.jeecg.modules.dock.entity.nest.NestBaseRequestVO;
import org.jeecg.modules.dock.entity.nest.NestUpdateStatusVO;
import org.jeecg.modules.dock.service.NestDockingRepeaterService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 套裁更新状态接口
 *
 * @author FanZhiwen
 * @version 1.0.0
 * @since 2023-11-22
 */
@Service
@Slf4j
@RequiredArgsConstructor
public class INestStatusServiceImpl implements INestStatusService {
    private final NestDockingRepeaterService nestDockingRepeaterService;
    private final IWmsDeliveryTaskService iWmsDeliveryTaskService;
    @Override
    public NestUpdateStatusVO updateStatus(List<NestBaseRequestVO.Body> detail) {
        NestBaseRequestVO requestVO = new NestBaseRequestVO();
        requestVO.setBody(detail);
        NestBaseRequestVO.Header header = new NestBaseRequestVO.Header();
        header.setApp("wms");
        header.setCode("wms_to_cam_batch_allocate_attention");
        header.setSeqNo("WMS"+ System.currentTimeMillis());
        requestVO.setHeader(header);
        NestUpdateStatusVO statusVO = nestDockingRepeaterService.updateStatus(requestVO);
        return statusVO;
    }
}
